package com.jic.market.enums;


/**
 * 
 * 奖品领取状态枚举
 *
 */
public enum LotteryCodeEnum {

	LOTTERY_RECEVIE_NO_0(0,"未领取"),
	LOTTERY_RECEVIED_1(1,"已领取"),
	LOTTERY_RECEVIE_EXPRIRE_2(2,"已失效"),

	;

	private Integer status;
	private String statusName;


	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getStatusName() {
		return statusName;
	}

	public void setStatusName(String statusName) {
		this.statusName = statusName;
	}

	private LotteryCodeEnum(Integer status, String statusName){
		this.status = status;
		this.statusName = statusName;
	}


	public static String getLotteryCodeByStatus(Integer status) {
		if(status == null){
			return "";
		}
		String statusName = null;
		for (LotteryCodeEnum enumVal : LotteryCodeEnum.values()) {
			if (enumVal.getStatus().equals(status)) {
				statusName = enumVal.getStatusName();
				break;
			}
		}
		return statusName;
	}
}
